package com.fang.mathtest;

public class human {
    //包括属性：姓名，性别，年龄；包括方法：吃饭，睡觉，工作
    private String Name;
    private String sex;
    private int age;

    public human() {
    }

    public human(String name, String sex, int age) {
        Name = name;
        this.sex = sex;
        this.age = age;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    //吃饭，睡觉，工作
    public void eating(){
        System.out.println("吃饭");
    }
    public void sleeping(){
        System.out.println("睡觉");
    }
    public void working(){
        System.out.println("工作");
    }
    private void car(){
        System.out.println("小轿车");
    }
}
